<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%-- <%@ page session="false"%> --%>

<title>Upload File Request Page</title>
<form action="<c:url value = '/api/uploadFile'/>" enctype="multipart/form-data" method="POST" id = "frm">
	File to upload: <input type="file" name="file"><br /> Name: <input
		type="text" name="name"><br /> <br /> <input type="submit" id = "subUpload"
		value="Upload"> Press here to upload the file!
	<%-- <input type="hidden" name="${_csrf.parameterName}"
	value="${_csrf.token}" /> --%>
</form>

<script>
	$(document).ready(function(){
		$(document).on("click","#subUpload",function(e){
				e.preventDefault();
				$("#frm").submit();
		});
	});
</script>